package com.zf.shuashua.ui.home;

import android.app.Activity;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.lxj.xpopup.core.CenterPopupView;
import com.zf.shuashua.R;

public class RepairPopup extends CenterPopupView {

    private Activity context;
    private TextView tvContent;
    private TextView tvTitle;
    private String title;
    private String confirm;

    public RepairPopup(@NonNull Activity context, String title, String confirm) {
        super(context);
        this.context = context;
        this.title = title;
        this.confirm = confirm;
    }


    @Override
    protected int getImplLayoutId() {
        return R.layout.repair_popup;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        tvTitle = findViewById(R.id.tvTitle);
        tvContent = findViewById(R.id.tvContent);
        tvTitle.setText(title + "");
        tvContent.setText(confirm + "");
        findViewById(R.id.tvConfirm).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                context.finish();
            }
        });

    }

}

